/**
 * Created by xinchunting on 17-11-29.
 */
$.validator.setDefaults({
    success: function() {
        console.log(1);
    },
    submitHandler: function() {
        alert("1")
    }
});
var Config = {
    createUrl: '/api/admin/systemUser/create'
};
$(document).ready(function() {
    $('.submitCreate').click(function () {
        $(".from_data").validate();
         if ($('.from_data').valid()) {
             var postData = $('.from_data').serializeArray();
         }
            $.ajax({
                url: Config.createUrl,
                type: "POST",
                data: postData,
                dataType: "json",
                success: function (data, textStatus, jqXHR) {
                    console.log(data);
                },
                error: function (jqXHR, textStatus, errorThrown) {
                }
            });
        return false;
    });
});